import App from './App'
//绑定uview工具
import uView from "uview-ui";
Vue.use(uView);

//将common绑定到vue的原型链上
import common from './utils/common.js';
Vue.prototype.$common = common
Object.setPrototypeOf(Vue.prototype, common)

//绑定路由
import { router, RouterMount } from './utils/router.js'  //路径换成自己的
Vue.use(router)

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
// #ifdef H5
RouterMount(app, router, '#app')
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif

// app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif